]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dateMenu: Get interval for the right timezone
authorJonas Dreßler <verdre@v0yd.nl>
Fri, 18 Feb 2022 13:26:23 +0000 (14:26 +0100)
committerMarge Bot <marge-bot@gnome.org>
Fri, 18 Feb 2022 19:55:46 +0000 (19:55 +0000)
We're calling get_interval on tzA right now for both the tzA and tzB,
this causes a critical error during shell startup:

g_time_zone_get_offset: assertion 'interval_valid (tz, (guint)interval)' failed

Fix this and use tzB to get the offset for timezone b.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2195>

js/ui/dateMenu.js

index 42cc192df2543b11b2d8f5b82a3344f71e2fab9d..8ed1a579b0b6855812206933124fc4f0ff99bece 100644 (file)
@@ -379,7 +379,7 @@ class WorldClocksSection extends St.Button {
             const tzA = a.location.get_timezone();
             const tzB = b.location.get_timezone();
             const intA = tzA.find_interval(GLib.TimeType.STANDARD, unixtime);
-            const intB = tzA.find_interval(GLib.TimeType.STANDARD, unixtime);
+            const intB = tzB.find_interval(GLib.TimeType.STANDARD, unixtime);
             return tzA.get_offset(intA) - tzB.get_offset(intB);
         });